<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
<h:head>
</h:head>
<h:body>
<ui:composition template="/templates/Plantilla.xhtml">
 <ui:define name="content">			  
  	<h3>Messages</h3>  
<h:form id="form1">  
    <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />  
  
    <p:commandButton id="infoButton" value="Info" actionListener="#{messagesController.addInfo}"/>  
    <p:commandButton id="warnButton" value="Warn" actionListener="#{messagesController.addWarn}"/>  
    <p:commandButton id="errorButton" value="Error" actionListener="#{messagesController.addError}"/>  
    <p:commandButton id="fatalButton" value="Fatal" actionListener="#{messagesController.addFatal}"/>  
</h:form>  
  
<h3>Message</h3>  
<h:form id="form2">  
    <h:panelGrid id="grid" columns="3">  
        <h:outputText value="Default: *" />  
        <p:inputText id="default" required="true" />  
        <p:message id="defaultMessage" for="default" />  
  
        <h:outputText value="Text Only: *" />  
        <p:inputText id="textOnly" required="true" />  
        <p:message id="textOnlyMessage" for="textOnly" display="text" />  
  
        <h:outputText value="Icon Only: *" />  
        <p:inputText id="iconOnly" required="true" />  
        <p:message id="iconMessage" for="iconOnly" display="icon" />  
    </h:panelGrid>  
  
    <p:commandButton id="submitButton" value="Submit" update="grid"/>
    
    <p:commandButton value="Update" action="#{messagesController.updateAguaDeRed}" ajax = "false"/>
    <p:commandButton value="Assig" action="#{messagesController.assignAguaDeRed}" ajax = "false"/>
    
    <p:commandButton actionListener="#{messagesController.actionListener}" action="#{messagesController.action}" value="click me" rendered="0">
        <f:setPropertyActionListener target="#{messagesController.property}" value="some value"/>
        <f:setPropertyActionListener target="#{messagesController.property2}" value="some other value"/>
</p:commandButton>  
</h:form>         	        	        	        
  </ui:define>
</ui:composition>
	
</h:body>
</html>